home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / hips / sources / scale_geom / pixel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-17  |  1009 b   |  37 lines

  1. /* pixel.h: pixel data types */
  2.  
  3. #ifndef PIXEL_HDR
  4. #define PIXEL_HDR
  5.  
  6. /* $Header: pixel.h,v 2.0 88/10/10 13:46:26 ph Locked $ */
  7.  
  8. /*
  9.  * we have pixel data types for various channel types and numbers of channels:
  10.  *    channel types: 1 byte int., 2 byte int., 4 byte int., 4 byte float
  11.  *    number of channels: 1 (monochrome), 3 (rgb), 4 (rgba)
  12.  */
  13.  
  14. typedef unsigned char            Pixel1;
  15. typedef struct {Pixel1 r, g, b;}    Pixel1_rgb;
  16. typedef struct {Pixel1 r, g, b, a;}    Pixel1_rgba;
  17. #define PIXEL1_MIN 0
  18. #define PIXEL1_MAX 255
  19.  
  20. typedef short                Pixel2;
  21. typedef struct {Pixel2 r, g, b;}    Pixel2_rgb;
  22. typedef struct {Pixel2 r, g, b, a;}    Pixel2_rgba;
  23. #define PIXEL2_MIN -32768
  24. #define PIXEL2_MAX 32767
  25.  
  26. typedef long                Pixel4;
  27. typedef struct {Pixel4 r, g, b;}    Pixel4_rgb;
  28. typedef struct {Pixel4 r, g, b, a;}    Pixel4_rgba;
  29.  
  30. typedef float                Pixelf;
  31. typedef struct {Pixelf r, g, b;}    Pixelf_rgb;
  32. typedef struct {Pixelf r, g, b, a;}    Pixelf_rgba;
  33.  
  34. #define PIXEL_UNDEFINED -239    /* to flag undefined vbls in various places */
  35.  
  36. #endif
  37.